package com.ruoyi.report.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * Promotions Report 数据表，存储 Walmart 平台的促销信息
 * @TableName walmart_promotions_report
 */
@TableName(value ="walmart_promotions_report")
@Data
public class WalmartPromotionsReport implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)  // 设置主键和主键策略
    private Long id;
    /**
     * 商品的 SKU（库存单位）
     */
    @TableField(value = "sku")
    private String sku;

    /**
     * 商品在 Walmart 平台上的唯一标识符
     */
    @TableField(value = "item_id")
    private String itemId;

    /**
     * 商品名称
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 商品类别
     */
    @TableField(value = "product_category")
    private String productCategory;

    /**
     * 促销的唯一标识符
     */
    @TableField(value = "promo_id")
    private String promoId;

    /**
     * 促销开始日期
     */
    @TableField(value = "promo_effective_date")
    private Date promoEffectiveDate;

    /**
     * 促销结束日期
     */
    @TableField(value = "promo_expiration_date")
    private Date promoExpirationDate;

    /**
     * 促销价格
     */
    @TableField(value = "promo_price")
    private BigDecimal promoPrice;

    /**
     * 促销价格的货币单位
     */
    @TableField(value = "promo_price_currency")
    private String promoPriceCurrency;

    /**
     * 对比价格
     */
    @TableField(value = "comparison_price")
    private BigDecimal comparisonPrice;

    /**
     * 对比价格的货币单位
     */
    @TableField(value = "comparison_price_currency")
    private String comparisonPriceCurrency;

    /**
     * 促销类型（如 BASE，REDUCED）
     */
    @TableField(value = "promo_type")
    private String promoType;

    /**
     * 促销状态（如 ACTIVATED）
     */
    @TableField(value = "promo_status")
    private String promoStatus;

    /**
     * 唯一请求id
     */
    @TableField(value = "request_id")
    private String requestId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WalmartPromotionsReport other = (WalmartPromotionsReport) that;
        return (this.getSku() == null ? other.getSku() == null : this.getSku().equals(other.getSku()))
            && (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getProductCategory() == null ? other.getProductCategory() == null : this.getProductCategory().equals(other.getProductCategory()))
            && (this.getPromoId() == null ? other.getPromoId() == null : this.getPromoId().equals(other.getPromoId()))
            && (this.getPromoEffectiveDate() == null ? other.getPromoEffectiveDate() == null : this.getPromoEffectiveDate().equals(other.getPromoEffectiveDate()))
            && (this.getPromoExpirationDate() == null ? other.getPromoExpirationDate() == null : this.getPromoExpirationDate().equals(other.getPromoExpirationDate()))
            && (this.getPromoPrice() == null ? other.getPromoPrice() == null : this.getPromoPrice().equals(other.getPromoPrice()))
            && (this.getPromoPriceCurrency() == null ? other.getPromoPriceCurrency() == null : this.getPromoPriceCurrency().equals(other.getPromoPriceCurrency()))
            && (this.getComparisonPrice() == null ? other.getComparisonPrice() == null : this.getComparisonPrice().equals(other.getComparisonPrice()))
            && (this.getComparisonPriceCurrency() == null ? other.getComparisonPriceCurrency() == null : this.getComparisonPriceCurrency().equals(other.getComparisonPriceCurrency()))
            && (this.getPromoType() == null ? other.getPromoType() == null : this.getPromoType().equals(other.getPromoType()))
            && (this.getPromoStatus() == null ? other.getPromoStatus() == null : this.getPromoStatus().equals(other.getPromoStatus()))
            && (this.getRequestId() == null ? other.getRequestId() == null : this.getRequestId().equals(other.getRequestId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSku() == null) ? 0 : getSku().hashCode());
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getProductCategory() == null) ? 0 : getProductCategory().hashCode());
        result = prime * result + ((getPromoId() == null) ? 0 : getPromoId().hashCode());
        result = prime * result + ((getPromoEffectiveDate() == null) ? 0 : getPromoEffectiveDate().hashCode());
        result = prime * result + ((getPromoExpirationDate() == null) ? 0 : getPromoExpirationDate().hashCode());
        result = prime * result + ((getPromoPrice() == null) ? 0 : getPromoPrice().hashCode());
        result = prime * result + ((getPromoPriceCurrency() == null) ? 0 : getPromoPriceCurrency().hashCode());
        result = prime * result + ((getComparisonPrice() == null) ? 0 : getComparisonPrice().hashCode());
        result = prime * result + ((getComparisonPriceCurrency() == null) ? 0 : getComparisonPriceCurrency().hashCode());
        result = prime * result + ((getPromoType() == null) ? 0 : getPromoType().hashCode());
        result = prime * result + ((getPromoStatus() == null) ? 0 : getPromoStatus().hashCode());
        result = prime * result + ((getRequestId() == null) ? 0 : getRequestId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", sku=").append(sku);
        sb.append(", itemId=").append(itemId);
        sb.append(", productName=").append(productName);
        sb.append(", productCategory=").append(productCategory);
        sb.append(", promoId=").append(promoId);
        sb.append(", promoEffectiveDate=").append(promoEffectiveDate);
        sb.append(", promoExpirationDate=").append(promoExpirationDate);
        sb.append(", promoPrice=").append(promoPrice);
        sb.append(", promoPriceCurrency=").append(promoPriceCurrency);
        sb.append(", comparisonPrice=").append(comparisonPrice);
        sb.append(", comparisonPriceCurrency=").append(comparisonPriceCurrency);
        sb.append(", promoType=").append(promoType);
        sb.append(", promoStatus=").append(promoStatus);
        sb.append(", requestId=").append(requestId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}